//
//  XMRequsetObject.m
//  DAILITest
//
//  Created by point on 2018/1/18.
//  Copyright © 2018年 whiteboard. All rights reserved.
//

#import "XMRequsetObject.h"

@implementation XMRequsetObject


-(instancetype)init {
    self = [super init];
    if (self) {
      
    }
    return self;
    
}



-(void)testOne {
   // NSLog(@"1");
    
    if ([_delegate respondsToSelector:@selector(requsetObject1:model:)]) {
        XMModel *model = [XMModel new];
        model.name = @"雄迈的实现1";
        [_delegate requsetObject1:self model:model];
    }
}

-(void)testTwo {
    if ([_delegate respondsToSelector:@selector(requsetObject2:model:)]) {
        XMModel *model = [XMModel new];
        model.name = @"雄迈的实现2";
        [_delegate requsetObject2:self model:model];
    }
   //   NSLog(@"2");
}

-(void)testThree {
    if ([_delegate respondsToSelector:@selector(requsetObject3:model:)]) {
        XMModel *model = [XMModel new];
        model.name = @"雄迈的实现3";
        [_delegate requsetObject3:self model:model];
    }
    //  NSLog(@"3");
}

- (void)list {
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self testOne];
    });
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self testTwo];
    });
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self testThree];
    });
}



@end
